package com.vivo.common;

import org.aspectj.lang.JoinPoint;

public class DataSourceInterceptor {

    public static final String DATASOURCE_AHBBK_DB = "dataSourceKey4AHBBKDb";
    public static final String DATASOURCE_JSBBK_DB = "dataSourceKey4JSBBKDb";
    public static final String DATASOURCE_MAIN_DB = "dataSourceKey4MainDb";

    public void setDatasourceAhbbkDb(JoinPoint jp) {
        DatabaseContextHolder.setDbType(DATASOURCE_AHBBK_DB);
    }

    public void setDatasourceJsbbkDb(JoinPoint jp) {
        DatabaseContextHolder.setDbType(DATASOURCE_JSBBK_DB);
    }

    public void setDatasourceMainDb(JoinPoint jp) {
        DatabaseContextHolder.setDbType(DATASOURCE_MAIN_DB);
    }
}
